public class Test {
    public static void main(String[] args) {
        MyArray<String> myArray = new MyArray<>();
        myArray.setVal(0,"hello");
        String ret = myArray.getPos(0);
        System.out.println(ret);

        System.out.println("==============================");

        MyArray<Integer> myArray1 = new MyArray<>();
        myArray1.setVal(0,10);
        Integer pos = myArray1.getPos(0);
        System.out.println(pos);

    }

    public static void main2(String[] args) {
        //拆箱
        Integer a = Integer.valueOf(20);

        //手动拆箱
        int i = a.intValue();
        System.out.println(i);

        //自动拆箱
        int ii = a;
        System.out.println(ii);

    }

    public static void main1(String[] args) {
        //装箱
        int a = 10;

        //手动装箱
        Integer i = Integer.valueOf(a);
        System.out.println(i);

        //自动装箱
        Integer ii = a;
        System.out.println(ii);

    }
}
